/*
 * Copyright (c) 2006-2023, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-06-29     Rbb666       first version
 */

#include <rtthread.h>
#include <rtdevice.h>

#include "drv_gpio.h"

#define LED_1_PIN  GET_PIN(0, 0)
#define LED_2_PIN  GET_PIN(0, 1)



#define ARD_PWM2  GET_PIN(5, 0)
#define ARD_PWM3  GET_PIN(5, 1)
#define ARD_PWM4  GET_PIN(11, 2)
#define ARD_PWM5  GET_PIN(11, 3)
#define ARD_PWM6  GET_PIN(11, 4)
#define ARD_PWM7  GET_PIN(11, 5)
#define ARD_PWM8  GET_PIN(5, 6)
#define ARD_PWM9  GET_PIN(5, 7)
#define ARD_PWM10  GET_PIN(0, 5)
#define ARD_PWM11  GET_PIN(0, 2)
#define ARD_PWM12  GET_PIN(0, 3)
#define ARD_PWM13  GET_PIN(0, 4)

#define SD_IO0     GET_PIN(2, 0)
#define SD_IO1     GET_PIN(2, 1)
#define SD_IO2     GET_PIN(2, 2)
#define SD_IO3     GET_PIN(2, 3)
#define SD_CMD     GET_PIN(2, 4)
#define SD_CLK     GET_PIN(2, 5)
#define SD_CD      GET_PIN(2, 6)

#define I2C_SCL   GET_PIN(3, 0)
#define I2C_SDA   GET_PIN(3, 1)
#define ARD_SDA   GET_PIN(8, 1)
#define ARD_SCL   GET_PIN(8, 0)



#define USR_BTN   GET_PIN(6, 2)
#define DAP_TX    GET_PIN(6, 4)
#define DAP_RX    GET_PIN(6, 5)
#define CSS_TX    GET_PIN(7, 0)
#define ARD_TX    GET_PIN(11, 1)
#define ARD_RX    GET_PIN(11, 0)


#define ARD_ADC0 GET_PIN(10, 0)
#define ARD_ADC1 GET_PIN(10, 1)
#define ARD_ADC2 GET_PIN(10, 2)
#define ARD_ADC3 GET_PIN(10, 3)
#define ARD_ADC4 GET_PIN(10, 4)
#define ARD_ADC5 GET_PIN(10, 5)


#define ARD_CSS_ADC0  GET_PIN(7, 3)
#define ARD_CSS_ADC1  GET_PIN(9, 0)
#define ARD_CSS_ADC2  GET_PIN(9, 1)
#define ARD_CSS_ADC3  GET_PIN(9, 2)
#define ARD_CSS_ADC4  GET_PIN(9, 3)













int main(void)
{
    rt_pin_mode(LED_1_PIN, PIN_MODE_OUTPUT);
    rt_pin_mode(LED_2_PIN, PIN_MODE_OUTPUT);

    for (;;)
    {
        rt_pin_write(LED_1_PIN, PIN_HIGH);
        rt_pin_write(LED_2_PIN, PIN_LOW);
        rt_thread_mdelay(500);
        rt_pin_write(LED_1_PIN, PIN_LOW);
        rt_pin_write(LED_2_PIN, PIN_HIGH);
        rt_thread_mdelay(500);
    }
}
